﻿// Inner Fire 游戏引擎库
// ImageInfo - 用于图片的Prefab
//
// Copyright (c) 2025 by 尔西大帝. All rights reserved.
//
// 用于图片的Prefab
//
// Author: 尔西大帝
// Email: 2670613871@qq.com
// Created: 2025-04-24

#pragma once

#include <dx/ui/ui_def.h>
#include <memory>
#include <static_string.h>
#include <xml_reader.h>

namespace ifire::ui {

class ImageInfo : public ikit::XmlInfo {
public:
  ImageInfo(const ikit::XmlNode& node, int index = 0)
      : XmlInfo(node, index), sprite(node("Sprite")), widget(node) {}
  ImageInfo(const ImageInfo& lhs) = delete;
  ImageInfo& operator=(const ImageInfo& lhs) = delete;
  ~ImageInfo() = default;

public:
  ikit::sstr sprite;
  dx::UIWidget widget;
};

using ImageInfoPtr = std::unique_ptr<ImageInfo>;

}; // namespace ifire::ui